 ///api/product/getBaseCategoryList
 import requests from './request'
 import mockRequests from './mockAjax'
 
 //Home
 export const reqCategoryList = ()=>{
    //发请求 axios发请求返回Promise对象
    return requests({url:'/product/getBaseCategoryList',method:'get'})
 }
//获取banner（Home首页轮播图接口）
export const reqGetBannerList = () => mockRequests.get("/banner");
//获取floor（Home首页轮播图接口）
export const reqGetFloorList = () => mockRequests.get("/floor");

//Search
export const reqGetSearchInfo = (searchParams) => requests.post('/list', searchParams)
// Detail
export const reqGetDetailInfo = (skuId)=>{
   //发请求 axios发请求返回Promise对象
   return requests({url:`/item/${skuId}`,method:'get'})
}
// Detail  产品添加到购物车中
export const reqAddOrUpdateShopCart = (skuId,skuNum)=>{
   //发请求 axios发请求返回Promise对象
   return requests({url:`/cart/addToCart/${skuId}/${skuNum}`,method:'post'})
}
// 获取购物车列表的数据结构  /api/cart/cartList
export const reqCartList = ()=>{
   //发请求 axios发请求返回Promise对象
   return requests({url:`/cart/cartList`,method:'get'})
}
